\(\int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx\) [228]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 31, antiderivative size = 133 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx=\frac {d^3 \text {arctanh}(\sin (e+f x))}{a^3 f}+\frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {(c-d) \left (2 \left (2 c^2+8 c d+11 d^2\right )+\left (2 c^2+11 c d+29 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2} \]

[Out]

d^3*arctanh(sin(f*x+e))/a^3/f+1/5*(c-d)*(c+d*sec(f*x+e))^2*tan(f*x+e)/f/(a+a*sec(f*x+e))^3+1/15*(c-d)*(4*c^2+1
6*c*d+22*d^2+(2*c^2+11*c*d+29*d^2)*sec(f*x+e))*tan(f*x+e)/a/f/(a+a*sec(f*x+e))^2

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.45, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4072, 100, 150, 65, 223, 209} \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx=\frac {2 d^3 \tan (e+f x) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a (\sec (e+f x)+1)}}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {(c-d) \tan (e+f x) \left (\left (2 c^2+11 c d+29 d^2\right ) \sec (e+f x)+2 \left (2 c^2+8 c d+11 d^2\right )\right )}{15 a f (a \sec (e+f x)+a)^2}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^2}{5 f (a \sec (e+f x)+a)^3} \]

[In]

Int[(Sec[e + f*x]*(c + d*Sec[e + f*x])^3)/(a + a*Sec[e + f*x])^3,x]

[Out]

(2*d^3*ArcTan[Sqrt[a - a*Sec[e + f*x]]/Sqrt[a*(1 + Sec[e + f*x])]]*Tan[e + f*x])/(a^2*f*Sqrt[a - a*Sec[e + f*x
]]*Sqrt[a + a*Sec[e + f*x]]) + ((c - d)*(c + d*Sec[e + f*x])^2*Tan[e + f*x])/(5*f*(a + a*Sec[e + f*x])^3) + ((
c - d)*(2*(2*c^2 + 8*c*d + 11*d^2) + (2*c^2 + 11*c*d + 29*d^2)*Sec[e + f*x])*Tan[e + f*x])/(15*a*f*(a + a*Sec[
e + f*x])^2)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 100

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*c -
a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*((e + f*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] + Dist[1/(b*(b*e - a*
f)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) + c*f*(p + 1)) + b*c*(d
*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p
] || IntegersQ[p, m + n])

Rule 150

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))*((g_.) + (h_.)*(x_)), x_Symbol] :
> Simp[((b^3*c*e*g*(m + 2) - a^3*d*f*h*(n + 2) - a^2*b*(c*f*h*m - d*(f*g + e*h)*(m + n + 3)) - a*b^2*(c*(f*g +
 e*h) + d*e*g*(2*m + n + 4)) + b*(a^2*d*f*h*(m - n) - a*b*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(n + 1)) + b^2*(c*(
f*g + e*h)*(m + 1) - d*e*g*(m + n + 2)))*x)/(b^2*(b*c - a*d)^2*(m + 1)*(m + 2)))*(a + b*x)^(m + 1)*(c + d*x)^(
n + 1), x] + Dist[f*(h/b^2) - (d*(m + n + 3)*(a^2*d*f*h*(m - n) - a*b*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(n + 1)
) + b^2*(c*(f*g + e*h)*(m + 1) - d*e*g*(m + n + 2))))/(b^2*(b*c - a*d)^2*(m + 1)*(m + 2)), Int[(a + b*x)^(m +
2)*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && (LtQ[m, -2] || (EqQ[m + n + 3, 0] &&  !L
tQ[n, -2]))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 4072

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[a^2*g*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]
])), Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*((c + d*x)^n/Sqrt[a - b*x]), x], x, Csc[e + f*x]], x] /; Free
Q[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p,
 1] || IntegerQ[m - 1/2])

Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(c+d x)^3}{\sqrt {a-a x} (a+a x)^{7/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x) \left (-a^2 \left (2 c^2+5 c d-2 d^2\right )-5 a^2 d^2 x\right )}{\sqrt {a-a x} (a+a x)^{5/2}} \, dx,x,\sec (e+f x)\right )}{5 a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {(c-d) \left (2 \left (2 c^2+8 c d+11 d^2\right )+\left (2 c^2+11 c d+29 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}-\frac {\left (d^3 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {(c-d) \left (2 \left (2 c^2+8 c d+11 d^2\right )+\left (2 c^2+11 c d+29 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {\left (2 d^3 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 a-x^2}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {(c-d) \left (2 \left (2 c^2+8 c d+11 d^2\right )+\left (2 c^2+11 c d+29 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {\left (2 d^3 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right )}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {2 d^3 \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right ) \tan (e+f x)}{a^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}+\frac {(c-d) \left (2 \left (2 c^2+8 c d+11 d^2\right )+\left (2 c^2+11 c d+29 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(295\) vs. \(2(133)=266\).

Time = 2.59 (sec) , antiderivative size = 295, normalized size of antiderivative = 2.22 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx=\frac {-240 d^3 \cos ^6\left (\frac {1}{2} (e+f x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )+(c-d) \cos \left (\frac {1}{2} (e+f x)\right ) \sec \left (\frac {e}{2}\right ) \left (5 \left (8 c^2+17 c d+29 d^2\right ) \sin \left (\frac {f x}{2}\right )-15 \left (2 c^2+5 c d+5 d^2\right ) \sin \left (e+\frac {f x}{2}\right )+20 c^2 \sin \left (e+\frac {3 f x}{2}\right )+65 c d \sin \left (e+\frac {3 f x}{2}\right )+95 d^2 \sin \left (e+\frac {3 f x}{2}\right )-15 c^2 \sin \left (2 e+\frac {3 f x}{2}\right )-15 c d \sin \left (2 e+\frac {3 f x}{2}\right )-15 d^2 \sin \left (2 e+\frac {3 f x}{2}\right )+7 c^2 \sin \left (2 e+\frac {5 f x}{2}\right )+16 c d \sin \left (2 e+\frac {5 f x}{2}\right )+22 d^2 \sin \left (2 e+\frac {5 f x}{2}\right )\right )}{30 a^3 f (1+\cos (e+f x))^3} \]

[In]

Integrate[(Sec[e + f*x]*(c + d*Sec[e + f*x])^3)/(a + a*Sec[e + f*x])^3,x]

[Out]

(-240*d^3*Cos[(e + f*x)/2]^6*(Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]] - Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/
2]]) + (c - d)*Cos[(e + f*x)/2]*Sec[e/2]*(5*(8*c^2 + 17*c*d + 29*d^2)*Sin[(f*x)/2] - 15*(2*c^2 + 5*c*d + 5*d^2
)*Sin[e + (f*x)/2] + 20*c^2*Sin[e + (3*f*x)/2] + 65*c*d*Sin[e + (3*f*x)/2] + 95*d^2*Sin[e + (3*f*x)/2] - 15*c^
2*Sin[2*e + (3*f*x)/2] - 15*c*d*Sin[2*e + (3*f*x)/2] - 15*d^2*Sin[2*e + (3*f*x)/2] + 7*c^2*Sin[2*e + (5*f*x)/2
] + 16*c*d*Sin[2*e + (5*f*x)/2] + 22*d^2*Sin[2*e + (5*f*x)/2]))/(30*a^3*f*(1 + Cos[e + f*x])^3)

Maple [A] (verified)

Time = 0.69 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.88

method result size
parallelrisch \(\frac {-60 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) d^{3}+60 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) d^{3}+3 \left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (\left (c -d \right )^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}-\frac {10 \left (c +2 d \right ) \left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{3}+5 c^{2}+20 c d +35 d^{2}\right )}{60 a^{3} f}\) \(117\)
derivativedivides \(\frac {-\frac {2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{3}}{3}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c \,d^{2}+3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2}-\frac {3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+\frac {3 c \,d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-7 d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+4 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) d^{3}+\frac {c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}-\frac {d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}-\frac {4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{3}}{3}-4 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) d^{3}}{4 f \,a^{3}}\) \(216\)
default \(\frac {-\frac {2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{3}}{3}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c \,d^{2}+3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2}-\frac {3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+\frac {3 c \,d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-7 d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+4 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) d^{3}+\frac {c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}-\frac {d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}-\frac {4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{3}}{3}-4 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) d^{3}}{4 f \,a^{3}}\) \(216\)
risch \(\frac {2 i \left (15 c^{3} {\mathrm e}^{4 i \left (f x +e \right )}-15 d^{3} {\mathrm e}^{4 i \left (f x +e \right )}+30 c^{3} {\mathrm e}^{3 i \left (f x +e \right )}+45 c^{2} d \,{\mathrm e}^{3 i \left (f x +e \right )}-75 d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+40 c^{3} {\mathrm e}^{2 i \left (f x +e \right )}+45 c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}+60 c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-145 d^{3} {\mathrm e}^{2 i \left (f x +e \right )}+20 c^{3} {\mathrm e}^{i \left (f x +e \right )}+45 c^{2} d \,{\mathrm e}^{i \left (f x +e \right )}+30 c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}-95 d^{3} {\mathrm e}^{i \left (f x +e \right )}+7 c^{3}+9 c^{2} d +6 c \,d^{2}-22 d^{3}\right )}{15 f \,a^{3} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{5}}-\frac {d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{a^{3} f}+\frac {d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{a^{3} f}\) \(281\)
norman \(\frac {\frac {\left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{11}}{20 a f}-\frac {\left (c^{3}+3 c^{2} d +3 c \,d^{2}-7 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 a f}+\frac {3 \left (3 c^{3}+c^{2} d -c \,d^{2}-3 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{10 a f}+\frac {\left (11 c^{3}+27 c^{2} d +21 c \,d^{2}-59 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{12 a f}-\frac {\left (13 c^{3}+21 c^{2} d +9 c \,d^{2}-43 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{10 a f}-\frac {\left (19 c^{3}-27 c^{2} d -3 c \,d^{2}+11 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{60 a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3} a^{2}}+\frac {d^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{a^{3} f}-\frac {d^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{a^{3} f}\) \(312\)

[In]

int(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/60*(-60*ln(tan(1/2*f*x+1/2*e)-1)*d^3+60*ln(tan(1/2*f*x+1/2*e)+1)*d^3+3*(c-d)*tan(1/2*f*x+1/2*e)*((c-d)^2*tan
(1/2*f*x+1/2*e)^4-10/3*(c+2*d)*(c-d)*tan(1/2*f*x+1/2*e)^2+5*c^2+20*c*d+35*d^2))/a^3/f

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.86 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx=\frac {15 \, {\left (d^{3} \cos \left (f x + e\right )^{3} + 3 \, d^{3} \cos \left (f x + e\right )^{2} + 3 \, d^{3} \cos \left (f x + e\right ) + d^{3}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left (d^{3} \cos \left (f x + e\right )^{3} + 3 \, d^{3} \cos \left (f x + e\right )^{2} + 3 \, d^{3} \cos \left (f x + e\right ) + d^{3}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (2 \, c^{3} + 9 \, c^{2} d + 21 \, c d^{2} - 32 \, d^{3} + {\left (7 \, c^{3} + 9 \, c^{2} d + 6 \, c d^{2} - 22 \, d^{3}\right )} \cos \left (f x + e\right )^{2} + 3 \, {\left (2 \, c^{3} + 9 \, c^{2} d + 6 \, c d^{2} - 17 \, d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{30 \, {\left (a^{3} f \cos \left (f x + e\right )^{3} + 3 \, a^{3} f \cos \left (f x + e\right )^{2} + 3 \, a^{3} f \cos \left (f x + e\right ) + a^{3} f\right )}} \]

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e))^3,x, algorithm="fricas")

[Out]

1/30*(15*(d^3*cos(f*x + e)^3 + 3*d^3*cos(f*x + e)^2 + 3*d^3*cos(f*x + e) + d^3)*log(sin(f*x + e) + 1) - 15*(d^
3*cos(f*x + e)^3 + 3*d^3*cos(f*x + e)^2 + 3*d^3*cos(f*x + e) + d^3)*log(-sin(f*x + e) + 1) + 2*(2*c^3 + 9*c^2*
d + 21*c*d^2 - 32*d^3 + (7*c^3 + 9*c^2*d + 6*c*d^2 - 22*d^3)*cos(f*x + e)^2 + 3*(2*c^3 + 9*c^2*d + 6*c*d^2 - 1
7*d^3)*cos(f*x + e))*sin(f*x + e))/(a^3*f*cos(f*x + e)^3 + 3*a^3*f*cos(f*x + e)^2 + 3*a^3*f*cos(f*x + e) + a^3
*f)

Sympy [F]

\[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx=\frac {\int \frac {c^{3} \sec {\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c^{2} d \sec ^{2}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx}{a^{3}} \]

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))**3/(a+a*sec(f*x+e))**3,x)

[Out]

(Integral(c**3*sec(e + f*x)/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(d**3*sec
(e + f*x)**4/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(3*c*d**2*sec(e + f*x)**
3/(sec(e + f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x) + Integral(3*c**2*d*sec(e + f*x)**2/(sec(e +
f*x)**3 + 3*sec(e + f*x)**2 + 3*sec(e + f*x) + 1), x))/a**3

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 307 vs. \(2 (126) = 252\).

Time = 0.23 (sec) , antiderivative size = 307, normalized size of antiderivative = 2.31 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx=-\frac {d^{3} {\left (\frac {\frac {105 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {20 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{3}}\right )} - \frac {3 \, c d^{2} {\left (\frac {15 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}} - \frac {c^{3} {\left (\frac {15 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}} - \frac {9 \, c^{2} d {\left (\frac {5 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, f} \]

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e))^3,x, algorithm="maxima")

[Out]

-1/60*(d^3*((105*sin(f*x + e)/(cos(f*x + e) + 1) + 20*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^5/(
cos(f*x + e) + 1)^5)/a^3 - 60*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^3 + 60*log(sin(f*x + e)/(cos(f*x + e)
 + 1) - 1)/a^3) - 3*c*d^2*(15*sin(f*x + e)/(cos(f*x + e) + 1) + 10*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin
(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3 - c^3*(15*sin(f*x + e)/(cos(f*x + e) + 1) - 10*sin(f*x + e)^3/(cos(f*x +
 e) + 1)^3 + 3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/a^3 - 9*c^2*d*(5*sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x
 + e)^5/(cos(f*x + e) + 1)^5)/a^3)/f

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 259 vs. \(2 (126) = 252\).

Time = 0.37 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.95 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx=\frac {\frac {60 \, d^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a^{3}} - \frac {60 \, d^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a^{3}} + \frac {3 \, a^{12} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 9 \, a^{12} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 9 \, a^{12} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 3 \, a^{12} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 10 \, a^{12} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 30 \, a^{12} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 20 \, a^{12} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 15 \, a^{12} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 45 \, a^{12} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 45 \, a^{12} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 105 \, a^{12} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{15}}}{60 \, f} \]

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e))^3,x, algorithm="giac")

[Out]

1/60*(60*d^3*log(abs(tan(1/2*f*x + 1/2*e) + 1))/a^3 - 60*d^3*log(abs(tan(1/2*f*x + 1/2*e) - 1))/a^3 + (3*a^12*
c^3*tan(1/2*f*x + 1/2*e)^5 - 9*a^12*c^2*d*tan(1/2*f*x + 1/2*e)^5 + 9*a^12*c*d^2*tan(1/2*f*x + 1/2*e)^5 - 3*a^1
2*d^3*tan(1/2*f*x + 1/2*e)^5 - 10*a^12*c^3*tan(1/2*f*x + 1/2*e)^3 + 30*a^12*c*d^2*tan(1/2*f*x + 1/2*e)^3 - 20*
a^12*d^3*tan(1/2*f*x + 1/2*e)^3 + 15*a^12*c^3*tan(1/2*f*x + 1/2*e) + 45*a^12*c^2*d*tan(1/2*f*x + 1/2*e) + 45*a
^12*c*d^2*tan(1/2*f*x + 1/2*e) - 105*a^12*d^3*tan(1/2*f*x + 1/2*e))/a^15)/f

Mupad [B] (verification not implemented)

Time = 13.52 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.11 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^3} \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {{\left (c-d\right )}^3}{4\,a^3}-\frac {3\,\left (c+d\right )\,{\left (c-d\right )}^2}{4\,a^3}+\frac {3\,{\left (c+d\right )}^2\,\left (c-d\right )}{4\,a^3}\right )}{f}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (\frac {{\left (c-d\right )}^3}{12\,a^3}-\frac {\left (c+d\right )\,{\left (c-d\right )}^2}{4\,a^3}\right )}{f}+\frac {2\,d^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{a^3\,f}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,{\left (c-d\right )}^3}{20\,a^3\,f} \]

[In]

int((c + d/cos(e + f*x))^3/(cos(e + f*x)*(a + a/cos(e + f*x))^3),x)

[Out]

(tan(e/2 + (f*x)/2)*((c - d)^3/(4*a^3) - (3*(c + d)*(c - d)^2)/(4*a^3) + (3*(c + d)^2*(c - d))/(4*a^3)))/f + (
tan(e/2 + (f*x)/2)^3*((c - d)^3/(12*a^3) - ((c + d)*(c - d)^2)/(4*a^3)))/f + (2*d^3*atanh(tan(e/2 + (f*x)/2)))
/(a^3*f) + (tan(e/2 + (f*x)/2)^5*(c - d)^3)/(20*a^3*f)